import request from '@/utils/request'
import cache from '@/utils/cache'
// 管家婆对照表列表


export function apiSkuMappingLists(params: any) {
    const uniacid = cache.get('company')
    params.uniacid = uniacid?.id
    return request.get({ url: '/sku.sku_mapping/lists', params })
}

// 添加管家婆对照表
export function apiSkuMappingAdd(params: any) {
    const uniacid = cache.get('company')
    params.uniacid = uniacid?.id
    return request.post({ url: '/sku.sku_mapping/add', params })
}

// 编辑管家婆对照表
export function apiSkuMappingEdit(params: any) {
    const uniacid = cache.get('company')
    params.uniacid = uniacid?.id
    return request.post({ url: '/sku.sku_mapping/edit', params })
}

// 删除管家婆对照表
export function apiSkuMappingDelete(params: any) {
    const uniacid = cache.get('company')
    params.uniacid = uniacid?.id
    return request.post({ url: '/sku.sku_mapping/delete', params })
}

// 管家婆对照表详情
export function apiSkuMappingDetail(params: any) {
    const uniacid = cache.get('company')
    params.uniacid = uniacid?.id
    return request.get({ url: '/sku.sku_mapping/detail', params })
}

// 管家婆上传并解析管家婆对照表
export function apiSkuMappingUploadExcel(params?: any) {
    const uniacid = cache.get('company')
    params.uniacid = uniacid?.id
    return request.post({ url: '/sku.sku_mapping/uploadExcel', params })
}

// 一键清空对照表
export function clearMapping() {
    const uniacid = cache.get('company')
    let params = {
        uniacid: uniacid?.id
    }
    return request.post({ url: '/sku.sku_mapping/clearMapping', params })
}

